home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / hf / dsp / dspdsk3 / loader.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-06  |  990 b   |  40 lines

  1. //***************************************************************************
  2. //
  3. // Experimental DSK loader for CONF=2 applications
  4. // Compile & link LOADER.CPP and MDM_DVR2.CPP (I used the large model)
  5. //
  6. // This loader is intended for use with a special bootloader: MDM_COM2.DSK
  7. // This bootloader loads code for a CONF=2 memory allocation
  8. //***************************************************************************
  9. #include <math.h>
  10. #include <float.h>
  11. #include <dos.h>
  12. #include <stdio.h>
  13. #include <conio.h>
  14. #include <stdlib.h>
  15. #include <string.h>
  16. #include <graphics.h>
  17. #include <bios.h>
  18. #include "dsk_drv2.h"
  19.  
  20. int port_no, baud;
  21. unsigned int ENTRY;
  22.  
  23. void main(int argc, char **argv)
  24. {
  25.  
  26.     baud = 1;
  27.     port_no = 0x3f8;              // COM1 default
  28.  
  29.     if(argc<2) {
  30.         printf("Missing command-line parameter\n");
  31.         exit(0);
  32.         }
  33.  
  34.     load_file(0,"");              // Boot MDM_COMM.DSK (basic I/O kernal)
  35.     ENTRY = load_file(2, argv[1]);
  36.     execute(ENTRY);
  37.  
  38. }
  39.  
  40.